package com.kayo.specimen.aspect;

import org.aspectj.lang.JoinPoint;
import org.aspectj.lang.annotation.After;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.aspectj.lang.annotation.Pointcut;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.stereotype.Component;

@Aspect
@Configuration
public class AspectForDataSorting {

    @Pointcut("execution(* list(..))")
    public void order(){}

    @Before("order()")
    public void before(JoinPoint joinPoint){

        System.out.println("before"+joinPoint.toString());
    }

    @After("order()")
    public void after(JoinPoint joinPoint){
        System.out.println("after"+joinPoint.toString());
    }
}
